package com.wlyuan.open.domain.source.constants;

import com.wlyuan.open.domain.source.SourceClass;
import lombok.Getter;

/**
 * @author lijing
 * @description
 */
@Getter
public enum CacheKeyEnum {
    /**
     * 车辆关系ID缓存key
     */
    PC_OPEN_PLATFORM_VEHICLE_RELATION_ID_CACHE("PC_OPEN_PLATFORM_VEHICLE_RELATION_ID_CACHE", "车辆关系id缓存", SourceClass.VEHICLE, 10),
    /**
     * 司机关系ID缓存key
     */
    PC_OPEN_PLATFORM_DRIVER_RELATION_ID_CACHE("PC_OPEN_PLATFORM_DRIVER_RELATION_ID_CACHE", "司机关系id缓存", SourceClass.DRIVER, 11),
    /**
     * 收货方关系ID缓存key
     */
    PC_OPEN_PLATFORM_CONSIGNEE_RELATION_ID_CACHE("PC_OPEN_PLATFORM_CONSIGNEE_RELATION_ID_CACHE", "收货方关系id缓存", SourceClass.CONSIGNEE, 20),
    /**
     * 客户关系ID缓存key
     */
    PC_OPEN_PLATFORM_CUSTOMER_RELATION_ID_CACHE("PC_OPEN_PLATFORM_CUSTOMER_RELATION_ID_CACHE", "客户关系id缓存", SourceClass.CUSTOMER, 21),
    /**
     * 物品关系ID缓存key
     */
    PC_OPEN_PLATFORM_GOODS_RELATION_ID_CACHE("PC_OPEN_PLATFORM_GOODS_RELATION_ID_CACHE", "物品关系缓存", SourceClass.GOODS, 22),
    /**
     * 租户关系ID缓存key
     */
    PC_OPEN_PLATFORM_TENANT_RELATION_ID_CACHE("PC_OPEN_PLATFORM_TENANT_RELATION_ID_CACHE", "租户关系id缓存", SourceClass.TENANT, 24),
    /**
     * 用户关系ID缓存key
     */
    PC_OPEN_PLATFORM_USER_RELATION_ID_CACHE("PC_OPEN_PLATFORM_USER_RELATION_ID_CACHE", "用户关系缓存", SourceClass.USER, 23),
    /**
     * 订单关系ID缓存key
     */
    PC_OPEN_PLATFORM_ORDER_RELATION_ID_CACHE("PC_OPEN_PLATFORM_ORDER_RELATION_ID_CACHE", "订单关系缓存", SourceClass.ORDER, 19),
    /**
     * 承运方关系ID缓存key
     */
    PC_OPEN_PLATFORM_CARRIER_RELATION_ID_CACHE("PC_OPEN_PLATFORM_CARRIER_RELATION_ID_CACHE", "承运方关系缓存", SourceClass.CARRIER, 18),
    /**
     * 运输单关系ID缓存key
     */
    PC_OPEN_PLATFORM_TRANSPORT_RELATION_ID_CACHE("PC_OPEN_PLATFORM_TRANSPORT_RELATION_ID_CACHE", "运单关系缓存", SourceClass.TRANSPORT, 16),

    /**
     * 合单单关系ID缓存key
     */
    PC_OPEN_PLATFORM_COMBINE_RELATION_ID_CACHE("PC_OPEN_PLATFORM_COMBINE_RELATION_ID_CACHE", "合单关系缓存", SourceClass.COMBINE, 9),
    /**
     * 合约关系ID缓存key
     */
    PC_OPEN_PLATFORM_TEMPLATE_RELATION_ID_CACHE("PC_OPEN_PLATFORM_TEMPLATE_RELATION_ID_CACHE", "合约关系缓存", SourceClass.TEMPLATE, 17),
    /**
     * 对账单ID缓存key
     */
    PC_OPEN_PLATFORM_BILL_RELATION_ID_CACHE("PC_OPEN_PLATFORM_BILL_RELATION_ID_CACHE", "对账单关系缓存", SourceClass.BILL, 8),
    ;

    private String key;
    private String name;
    private SourceClass sourceClass;
    private long timeToLive;

    CacheKeyEnum(String key, String name, SourceClass sourceClass, long timeToLive) {
        this.key = key;
        this.name = name;
        this.sourceClass = sourceClass;
        this.timeToLive = timeToLive;
    }
}
